﻿using Styx;

using Styx.CommonBot.Routines;
using Styx.Helpers;
using Styx.WoWInternals;
using Styx.WoWInternals.WoWObjects;
using Styx.TreeSharp;
using Action = Styx.TreeSharp.Action;

using CommonBehaviors.Actions;


namespace Crusader
{
    partial class Routine: CombatRoutine
    {

        partial class Warrior
        {
            #region Combat composites

            public static Composite FuryCombatBehavior()
            {
                return new Decorator(ret => Me.CurrentTarget != null && !Me.Mounted,
                    new PrioritySelector(
                        AutoAttack()
                        /*,
                        CastBuff("Battle Shout"),

                        new Decorator(ret => Crusader.Settings.Instance.AllowAoE && EnemyUnits.Count >= Crusader.Settings.Instance.AoEAt,
                            new PrioritySelector(
                                CastCooldown("Inner Rage"),
                                CastSpell("Cleave"),
                                CastSpell("Whirlwind")
                            )
                        ),

                        CastSpell("Execute", ret => Me.CurrentTarget.HealthPercent <= 20 && (!PlayerHasBuff("Executioner") || PlayerHasBuffStacks("Executioner") < 5 || PlayerBuffTimeLeft("Executioner") < 2)),
                        CastBuff("Berserker Rage", ret => !PlayerHasBuff("Enrage")),
                        CastSpell("Colossus Smash"),
                        CastSpell("Raging Blow", ret => PlayerHasBuff("Enrage") || PlayerHasBuff("Berserker Rage")),
                        CastSpell("Bloodthirst"),
                        CastSpell("Slam", ret => PlayerHasBuff("Bloodsurge")),
                        CastSpell("Heroic Strike", ret => Me.CurrentRage >=50),

                        UseTrinket1("Deathwish"),
                        UseTrinket2("Deathwish"),
                        UseGloves("Deathwish")
                        */
                    )
                );
            }

            #endregion
        }
    }
}